﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TetrisService
{
    /// <summary>
    /// This class will hold the game status.
    /// </summary>
    [Serializable]
    public class GameStatus
    {
        public int score;
        public int refreshTime;
        public int level;
        public int nextTetromino;
        public int lines;
        public bool isGameOver;
        public int[][] board;

        public GameStatus(){}

        /// <summary>
        /// Gets or sets the current score.
        /// </summary>
        /// <value>
        /// The score.
        /// </value>
        public int Score
        {
            get { return score; }
            set { score = value; }
        }

        /// <summary>
        /// In this context, refresh time means the gravity of the game. The lower the
        /// refresh time is, the faster the pieces will go down.
        /// </summary>
        /// <value>
        /// The refresh time.
        /// </value>
        public int RefreshTime
        {
            get { return refreshTime; }
            set { refreshTime = value; }
        }

        /// <summary>
        /// Gets or sets the current level.
        /// </summary>
        /// <value>
        /// The level.
        /// </value>
        public int Level
        {
            get { return level; }
            set { level = value; }
        }

        /// <summary>
        /// Gets or sets the next tetromino.
        /// </summary>
        /// <value>
        /// The next tetromino.
        /// </value>
        public int NextTetromino
        {
            get { return nextTetromino; }
            set { nextTetromino = value; }
        }

        /// <summary>
        /// Gets or sets the current number of lines done by the player.
        /// </summary>
        /// <value>
        /// The lines.
        /// </value>
        public int Lines
        {
            get { return lines; }
            set { lines = value; }
        }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is game over.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is game over; otherwise, <c>false</c>.
        /// </value>
        public bool IsGameOver
        {
            get { return isGameOver; }
            set { isGameOver = value; }
        }

        /// <summary>
        /// Gets or sets the game board which is represented by a bidimensional array of integer.
        /// </summary>
        /// <value>
        /// The game board.
        /// </value>
        public int[][] Board
        {
            get { return board; }
            set { board = value; }
        }
    }
}